/*
 * @Author: jiangh1 1141429595@qq.com
 * @Date: 2023-09-18 15:40:12
 * @LastEditors: jiangh1 1141429595@qq.com
 * @LastEditTime: 2023-09-18 15:40:22
 * @FilePath: \note\vue3\frame\vite-ts\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import {createRouter, createWebHashHistory, RouteRecordRaw} from "vue-router";
import Layout from "../Layout/layout.vue";

const routes: Array<RouteRecordRaw> = [
    {
        path: "/",
        component: Layout,
        redirect: "/home",
        meta: {},
        children: [
            {
                path: "/home",
                component: () => import("../views/home.vue"),
                meta: {},
            },
            {
                path: "/test",
                component: () => import("../views/test.vue"),
                meta: {},
            },
            {
                path: "/form",
                component: () => import("../views/form.vue"),
                meta: {},
            },
            {
                path: "/table",
                component: () => import("../views/table.vue"),
                meta: {},
            },
        ],
    },
];

const router = createRouter({
    history: createWebHashHistory(), //createWebHashHistory() hash模式
    routes,
});
export default router;
